<template>
 <h1>文本指令练习</h1>
  <h4>结果是:{{info}}</h4>
  <p>{{info+'喜欢ys'}}</p>
  {{info}}
  <hr>
  <button @click="f">点击</button>
  <hr>
  <p>{{info2}}</p>
  <p v-text="info2"></p>
  <p v-html="info2"></p>
  <hr>
  <p>计数：{{count}}</p>
  <button @click="f2">按钮</button>
</template>

<script setup>
import {ref} from "vue";

const info=ref('我是ys');
const info2=ref('<b>ys</b>是我的<mark>人</mark>')
const f=()=>{
  console.log('点击了按钮');
  console.log(info);
}
const count=ref(0);
const f2=()=>{
  count.value++;
}
</script>


<style scoped>

</style>